<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
    <namespaces>
        <Namespace>
            <prefix>st_${GML_PREFIX}</prefix>
            <uri>http://www.stations_${GML_PREFIX}.org/1.0</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink</uri>
        </Namespace>
    </namespaces>
    <sourceDataStores>
        <DataStore>
            <id>measurements_${GML_PREFIX}</id>
            <parameters>
                <Parameter>
                    <name>directory</name>
                    <value>file:./</value>
                </Parameter>
            </parameters>
        </DataStore>
    </sourceDataStores>
    <targetTypes>
        <FeatureType>
            <schemaUri>stations_${GML_PREFIX}.xsd</schemaUri>
        </FeatureType>
    </targetTypes>
    <typeMappings>
        <FeatureTypeMapping>
            <sourceDataStore>measurements_${GML_PREFIX}</sourceDataStore>
            <sourceType>measurements_${GML_PREFIX}</sourceType>
            <targetElement>st_${GML_PREFIX}:Measurement_${GML_PREFIX}</targetElement>
            <attributeMappings>
                <AttributeMapping>
                    <targetAttribute>st_${GML_PREFIX}:Measurement_${GML_PREFIX}</targetAttribute>
                    <idExpression>
                        <OCQL>ID</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>st_${GML_PREFIX}:value</targetAttribute>
                    <sourceExpression>
                        <OCQL>VALUE</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>name</name>
                        <value>NAME</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>unit</name>
                        <value>UNIT</value>
                    </ClientProperty>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>FEATURE_LINK[1]</targetAttribute>
                    <sourceExpression>
                        <OCQL>STATION</OCQL>
                    </sourceExpression>
                </AttributeMapping>
            </attributeMappings>
        </FeatureTypeMapping>
    </typeMappings>
</as:AppSchemaDataAccess>